package com.demo.demothread;

/**
 * @PackageName com.demo.demothread
 * @Description TODO
 * @Author WK
 * @CreateTime 2023/3/13 9:48
 */
public class MyTask implements Runnable{
    int i=0;

    public MyTask(int i){
        this.i=i;
    }

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()+"-"+i);
        try {
            //业务逻辑
            Thread.sleep(1000L);
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
